
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<?php echo $this->Html->css(array('global', 'input', 'cidades', 'copa_2014', 'anunciar', 'coin-slider-styles', 'jquery.countdown', 'admin', 'calendario'));?>
<?php echo $this->Html->script(array('jquery')); ?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HomeStay 2014</title>
<script type="text/javascript">
	jQuery(function(){
		$('#login_starter').click(function(){
			$('#login').slideToggle();
		});
		$('#login_fechar').click(function(){
			$('#login').slideToggle();
		});
		$('.alert_fechar').click(function(){
			$('#alert').toggle();
			$('#fundo').toggle();
		});
		$('.modal_fechar').click(function(){
			$('#modal').toggle();
			$('#fundo').toggle();
		});

		$('#fechar_container_fotos').live('click', function(){
			$('#container_fotos').toggle();
			$('#fundo').toggle();
		});
	});
	
</script>
<?php if($para_facebook){?>
<meta property="og:title" content="Anúncio do HomeStay 2014" />
<meta property="og:type" content="" />
<meta property="og:url" content="http://homestay2014.com/anuncios/view_completo/<?php echo $anuncio['Anuncio']['id_anuncios'];?>" />
<meta property="og:image" content="http://homestay2014.com/<?php echo $anuncio['Fotos']['foto1'];?>" />
<meta property="og:site_name" content="HOMESTAY" />
<meta property="fb:admins" content="100003176160917" />
<?php }?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-31315403-1']);
  _gaq.push(['_setDomainName', 'homestay2014.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) {return;}
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
</script>
<div class="wrapper">
	<?php
	$auth_msg = $this->Session->flash('auth');
	$flash_msg = $this->Session->flash(); 
	if($auth_msg != false || $flash_msg != false){ 
	?>
	<script type="text/javascript">
	jQuery(function(){
		
		$('#fundo').show();
		$('#alert').show();
	});
	</script>
	<?php 
	echo "<div id='alert''>";
	echo $auth_msg;
	echo $flash_msg;
	?>
	<button class='alert_fechar'><?php echo __('fechar');?></button>
	<?php 
	}else{?>
	<div id='modal'>
	<div class="modal_fechar"><?php echo $this->Html->image('close.png');?></div>
	<div class=conteudo></div>	
	<?php } ?>
	</div>
	<div id='container_fotos'></div>
	<div class="header_container">
		<div class="header">
			<?php if(!$logado){?>
				<div id=login>
					<?php echo $this->Form->create('Usuario', array('url'=>'/usuarios/login'));?>
						<div style="display:none;">
							<input type="hidden" name="_method" value="POST">
						</div>
						<div class="input text required">
							<label for="UsuarioEmail"><?php echo __('email');?></label>
							<input name="data[Usuario][email]" maxlength="255" type="text" id="UsuarioEmail">
						</div>
						<div class="input text required">
							<label for="UsuarioSenha"><?php echo __('senha');?></label>
							<input name="data[Usuario][senha]" maxlength="255" type="password" id="UsuarioSenha">
						</div>
						<div class="entrar">
							<div class="submit">
								<input type="submit" value="<?php echo __('entrar');?>">
							</div>
						</div>					
						<div class="voltar">
							<a id="login_fechar" href="javascript:void();"><?php echo __('voltar');?></a>
						</div>
					</form>
				</div>
			<?php }?>
			<div class="container_barra_superior">
				<div class="barra_superior">
					<?php echo $this->Html->image('bandeiras/brasil.gif', array('class'=>'idiomas', 'alt'=>'Português', 'title'=>'Português'))?>
					<?php echo $this->Html->image('bandeiras/eua.gif', array('class'=>'idiomas','alt'=>'English', 'title'=>'English'))?>
					<?php echo $this->Html->image('bandeiras/espanha.jpg', array('class'=>'idiomas','alt'=>'Español', 'title'=>'Español'))?>
					<?php if($logado){?>
						<span id="login_starter"><?php echo __('bem-vindo').$usuarioAtual['nome'];?></span>
						<?php echo $this->Html->link('Sair', array('controller'=>'usuarios','action'=>'logout'))?>
					<?php }else{?>
						<span id="login_starter"><?php echo __('area_assinante');?></span>
					<?php }?>
				</div>
			</div>
			<div class="container_titulo">
				<div class="logo">
					<?php echo $this->Html->link($this->Html->image('logo.png', array('class'=>'logo')), '/', array('escape' => false));?>
				</div>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
		<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
		<?php if(!isset($nao_midias) || !$nao_midias){?>
		<div class="container_midias_sociais">
				<div class="midias_sociais">
				<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><br>
				<div class="fb-like" data-send="false" data-layout="button_count" data-width="100" data-show-faces="true"></div>
				</div>
		</div>
		<?php }?>
	</div>
	<div class="page_container">
		<div class="container_menu_superior">
			<div class="menu_superior">
				<div><?php echo $this->Html->link(__('home'), '/')?></div>
				<div><?php echo $this->Html->link(__('buscar'), array('controller'=>'anuncios', 'action'=>'busca_generica'));?></div>
					<div><?php echo $this->Html->link(__('copa_2014'), array('controller'=>'pages', 'action'=>'display', 'copa_2014'));?></div>
				<?php if($logado){?> 
					<div class='assinante'><?php echo $this->Html->link(__('Minha Conta'), array('controller'=>'usuarios', 'action'=>'opcoes'));?></div>
					<div class='assinante'>
						<?php if($this->Session->read('Mensagens.nao_lidas') > 0){?>
							<?php echo $this->Html->link(__('Mensagens')." (".$this->Session->read('Mensagens.nao_lidas').")", array('controller'=>'mensagems', 'action'=>'lista'), array('id' =>'msg'));?>
						<?php }else{?>
							<?php echo $this->Html->link(__('Mensagens'), array('controller'=>'mensagems', 'action'=>'lista'));?>
						<?php }?>						
					</div>
				<?php }else{?> 
					<div><?php echo $this->Html->link(__('anunciar'), array('controller'=>'pages', 'action'=>'display', 'anunciar'));?></div>
					<div><?php echo $this->Html->link(__('acessar'), array('controller'=>'usuarios', 'action'=>'login'));?></div>
				<?php }?>
			</div>
			<div class="clear"></div>
		</div>
		<div class="container_centro">
			<div class="centro">
				<div class="coluna_esquerda">
					<div class="titulo">
						<?php echo __('escolha_uma_sede')?>
					</div> 
					<div class="container_cidades">
						<div class="cidades">
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/bh_1_108x95.png'),
									'/cidades/1/belo_horizonte',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/bs_1_108x95.png'),
									'/cidades/2/brasilia',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/ca_1_108x95.png'),
									'/cidades/3/cuiaba',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/cb_1_108x95.png'),
									'/cidades/4/curitiba',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/fl_1_108x95.png'),
									'/cidades/5/fortaleza',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/mn_1_108x95.png'),
									'/cidades/6/manaus',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/nt_1_108x95.png'),
									'/cidades/7/natal',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/pa_1_108x95.png'),
									'/cidades/8/porto_alegre',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/rf_1_108x95.png'),
									'/cidades/9/recife',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/rj_1_108x95.png'),
									'/cidades/10/recife',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/sa_1_108x95.png'),
									'/cidades/11/salvador',array('escape' => false));?>
							</div>
							<div class="bloco">
								<?php echo $this->Html->link($this->Html->image('cidades/sp_1_108x95.png'),
									'/cidades/12/sao_paulo',array('escape' => false));?>
							</div>
							<div class="clear"></div>
						</div>
						<div class="clear"></div>
					</div>
					<div class="clear"></div>
					<div class="box_twitter">
						<script src="http://widgets.twimg.com/j/2/widget.js"></script>
						<script>
							new TWTR.Widget({
							  version: 2,
							  type: 'search',
							  search: 'copa 2014',
							  interval: 30000,
							  title: 'Homestay2014',
							  subject: 'A Copa do Mundo na sua casa',
							  width: 250,
							  height: 300,
							  theme: {
							    shell: {
							      background: '#8fd9c0',
							      color: '#ffffff'
							    },
							    tweets: {
							      background: '#ffffff',
							      color: '#444444',
							      links: '#1985b5'
							    }
							  },
							  features: {
							    scrollbar: true,
							    loop: true,
							    live: true,
							    behavior: 'default'
							  }
							}).render().start();
						</script>
					</div>
					<div class="fb-like-box" data-href="http://www.facebook.com/pages/HomeStay2014/174097969354921" data-width="250" data-show-faces="true" data-stream="false" data-header="false"></div>
				</div>
				<div class="coluna_direita">
					<?php echo $content_for_layout;?>
				</div>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
	<div class="clear"></div>
	<div class="container_footer">
		<div class="footer">
			<div class="barra_links">
				<?php echo $this->Html->link(__('Quem somos'), array('controller'=>'pages', 'action'=>'display', 'quem_somos')); ?> |
				<a href="http://www.brasil.gov.br/" target="_blank"><?php echo __('governo_federal');?></a> |     
				<a href="http://www.turismo.gov.br/turismo/home.html" target="_blank"><?php echo __('ministerio_turismo');?></a> |     
				<a href="http://www.portal2014.org.br/" target="_blank"><?php echo __('copa_mundo_2014');?></a> | 
				<a href=""><?php echo __('fale_conosco');?></a><br>
				©2011 - Homestay2014    	
			</div>
		</div>
	</div>
</div>
<div id=fundo></div>
<?php //echo $this->element('sql_dump'); ?>
</body>
</html>